#include <iostream>
using namespace std;

template <class Type> class Test {
  public:
    Test(Type a[], int iSize) : elem(a) { size = iSize; }
    void Print() const {
        for (int i = 0; i < size; i++)
            cout << elem[i] << "  ";
    }

  private:
    Type *elem;
    int size;
};

int main() {
    int a[] = {1, 0, 8};
    double b[] = {1.6, 1.8};

    Test<int> ar1(a, 3);
    ar1.Print();

    Test<double> ar2(b, sizeof(b) / sizeof(double));
    ar2.Print();

    cout << endl;

    return 0;
}
